<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      /* 
      1.  [[Prototype]] 对象的原型
      2. 所有对象都有 [[Prototype]] 属性
      */
      const person = {
        name: "jack",
        say() {
          console.log("hello");
        },
      };
      const user = {};
      user.__proto__ = person; // 原型继承
      console.log(user.name);
      user.say();
    </script>
  </body>
</html>
